// Eric Lorenz, Matt Rodano, Thomas Bradley
// SSW-567, Spring 2010, Professor Laird
// Assignment 1: Triangle Program

#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;


int main()
{
// Declarations

     int s1, s2, s3;
     
// Input
     
     cout<<"\nEnter the length of side 1: ";
     cin>>s1;
  
     cout<<"\nEnter the length of side 2: ";
     cin>>s2;
     
     cout<<"\nEnter the length of side 3: ";
     cin>>s3;
  
//Output

	 if(s1>0 && s2>0 && s3>0)
	 {
     cout<<"\n\nThis is a";
    
     if(s1==s2 && s2==s3)
          cout<<"n Equilateral ";

     if( (s1==s2 && s2!=s3) || (s2==s3 && s3!=s1) || (s3==s1 && s1!=s2) )
          cout<<"n Isoceles ";
     
     if(s1!=s2 && s2!=s3 && s3!=s1)
          cout<<" Scalene ";
          
     if( ((s1*s1 + s2*s2) == s3*s3) || ((s1*s1 + s3*s3) == s2*s2) || ((s2*s2 + s3*s3) == s1*s1) )
          cout<<"Right ";
          
     cout<<"Triangle.";
	 }
	 else
		 cout<<"\nInput invalid. All values must be greater than 0.";
          

     cout<<"\n\n";
     system("pause");
                    
     return 0;     
     
}
